﻿<!DOCTYPE html>
<html>
<head>
    <title>FineUI版本发布周期（天）</title>
    <link href="../res/css/main.css" rel="stylesheet" type="text/css" />
    <style>
        body {
            font-size: 13px;
        }

        #desc {
            font-weight: bold;
            text-align: left;
            margin: 20px 0 10px;
            font-size: 14px;
        }
    </style>
</head>
<body class="f-body">
    <div id="desc">
    </div>
    <div id="chart_div">
    </div>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
        google.load("visualization", "1", {
            packages: ["corechart"]
        });
        google.setOnLoadCallback(drawChart);

        function drawChart() {
            var vs = preprocessVersions(), v, count = vs.length, chart, data;

            data = new google.visualization.DataTable();
            data.addColumn('string', '版本');
            data.addColumn('number', '版本间隔天数');
            data.addRows(count);

            for (var i = count - 1, j = 0; i >= 0; i--, j++) {
                v = vs[i];
                data.setValue(j, 1, v[2]);
                data.setValue(j, 0, v[1] + " (" + v[0] + ")");
            }

            chart = new google.visualization.BarChart(document.getElementById('chart_div'));
            chart.draw(data, {
                height: 2500,
                width: 900,
                fontSize: 13,
                title: 'FineUI版本发布周期（天）',
                vAxis: {
                    title: 'FineUI版本'
                },
                chartArea: {
                    top: 30,
                    left: 200
                }
            });

            document.getElementById('desc').innerHTML = 'FineUI版本发布周期（总计发布了 ' + vs.length + ' 个版本）';
        }

        function preprocessVersions() {
            var data = [
			    ["v0.1 preview", "2008-04-11"],
			    ["v0.1 preview2", "2008-04-25"],
			    ["v0.1 beta1", "2008-04-30"],
			    ["v0.1 beta2", "2008-05-08"],
			    ["v0.1 beta3", "2008-05-14"],
			    ["v0.1 beta4", "2008-05-20"],
			    ["v0.1 beta5", "2008-05-23"],
			    ["v0.1 beta6", "2008-05-27"],
			    ["v0.1 beta7", "2008-05-29"],
			    ["v0.1 beta8", "2008-05-30"],
			    ["v0.1 beta9", "2008-06-03"],
			    ["v0.1 beta10", "2008-06-05"],
			    ["v0.1 beta12", "2008-06-10"],
			    ["v0.2 beta1", "2008-06-12"],
			    ["v0.2 beta2", "2008-06-13"],
			    ["v0.2 beta3", "2008-06-16"],
			    ["v0.2 beta4", "2008-06-17"],
			    ["v0.2 beta6", "2008-06-19"],
			    ["v0.2 beta7", "2008-06-20"],
			    ["v0.2 beta8", "2008-06-23"],
			    ["v0.2 beta9", "2008-06-25"],
			    ["v0.2 beta10", "2008-06-27"],
			    ["v0.2 beta11", "2008-06-30"],
			    ["v0.2 beta12", "2008-07-02"],
			    ["v0.3 beta1", "2008-07-03"],
			    ["v0.3 beta2", "2008-07-07"],
			    ["v0.3 beta3", "2008-07-08"],
			    ["v0.3 beta4", "2008-07-09"],
			    ["v0.3 beta5", "2008-07-12"],
			    ["v0.3 beta6", "2008-07-14"],
			    ["v0.3 beta8", "2008-07-16"],
			    ["v0.3 beta9", "2008-07-22"],
			    ["v0.3 beta10", "2008-07-23"],
			    ["v0.3 beta11", "2008-07-24"],
			    ["v0.3 beta12", "2008-07-31"],
			    ["v0.4 beta1", "2008-08-05"],
			    ["v0.4 beta2", "2008-08-08"],
			    ["v0.4 beta3", "2008-08-12"],
			    ["v0.4 beta4", "2008-08-13"],
			    ["v0.4 beta5", "2008-08-15"],
			    ["v0.4 beta6", "2008-08-19"],
			    ["v1.0", "2008-08-26"],
			    ["v1.1 beta1", "2008-08-29"],
			    ["v1.1 beta3", "2008-08-31"],
			    ["v1.1 beta4", "2008-09-01"],
			    ["v1.1 beta5", "2008-09-02"],
			    ["v1.1 beta6", "2008-09-04"],
			    ["v1.1 beta7", "2008-09-08"],
			    ["v1.1", "2008-09-09"],
			    ["v1.2 beta1", "2008-09-19"],
			    ["v1.2 beta2", "2008-09-22"],
			    ["v1.2 beta3", "2008-09-25"],
			    ["v1.2 beta4", "2008-09-27"],
			    ["v1.2 beta5", "2008-10-15"],
			    ["v1.2 beta6", "2008-10-20"],
			    ["v1.2 beta7", "2008-10-28"],
			    ["v1.2 beta8", "2009-02-23"],
			    ["v1.2 beta9", "2009-02-27"],
			    ["v1.3.0", "2009-03-03"],
			    ["v1.3.1", "2009-03-25"],
			    ["v2.0 beta1", "2009-07-05"],
			    ["v2.0 beta2", "2009-07-13"],
			    ["v2.0 beta3", "2009-07-22"],
			    ["v2.0 beta4", "2009-08-02"],
			    ["v2.0 beta5", "2009-08-09"],
			    ["v2.0.6", "2009-08-14"],
			    ["v2.0.7", "2009-08-25"],
			    ["v2.0.8", "2009-08-29"],
			    ["v2.0.9", "2009-09-01"],
			    ["v2.1.0", "2009-09-06"],
			    ["v2.1.1", "2009-09-15"],
			    ["v2.1.2", "2009-09-27"],
			    ["v2.1.3", "2009-10-19"],
			    ["v2.1.4", "2009-11-17"],
			    ["v2.1.5", "2009-11-21"],
			    ["v2.1.6", "2009-11-26"],
			    ["v2.1.7", "2009-12-01"],
			    ["v2.1.8", "2009-12-06"],
			    ["v2.1.9", "2010-01-06"],
			    ["v2.2.0", "2010-01-31"],
			    ["v2.2.1", "2010-03-28"],
			    ["v2.3.1", "2010-06-30"],
			    ["v2.3.2", "2010-09-29"],
			    ["v2.3.3", "2011-02-22"],
			    ["v2.3.4", "2011-05-02"],
			    ["v2.3.5", "2011-05-09"],
                ["v3.0.0", "2012-01-28"],
                ["v3.0.1", "2012-02-05"],
                ["v3.1.0", "2012-03-04"],
                ["v3.1.1", "2012-04-02"],
                ["v3.1.2", "2012-04-04"],
                ["v3.1.3", "2012-04-08"],
                ["v3.1.4", "2012-04-24"],
                ["v3.1.5", "2012-05-06"],
                ["v3.1.6", "2012-05-20"],
                ["v3.1.7", "2012-06-03"],
                ["v3.1.8", "2012-06-24"],
                ["v3.1.9", "2012-08-18"],
                ["v3.2.0", "2012-11-18"],
                ["v3.2.1", "2012-11-25"],
                ["v3.2.2", "2012-12-03"],
                ["v3.2.3", "2013-01-09"],
                ["v3.2.4", "2013-03-23"],
				["v3.2.5", "2013-04-27"],
                ["v3.2.6", "2013-05-21"],
                ["v3.3.0", "2013-06-17"],
                ["v3.3.1", "2013-07-29"],
                ["v4.0.1 beta", "2013-10-28"],
                ["v3.3.2", "2013-11-21"],
                ["v4.0.2 beta", "2013-12-14"],
                ["v3.3.3", "2014-01-20"],
                ["v4.0.3 beta", "2014-01-20"]
            ];

            // 初始化第一个数据
            data[0][2] = 0;

            var i = 1, count = data.length;
            for (; i < count; i++) {
                data[i][2] = (new Date(data[i][1]) - new Date(data[i - 1][1])) / (24 * 60 * 60 * 1000);
            }

            return data;
        }


    </script>
</body>
</html>
